import axios from 'axios'
const service = axios.create({
  baseURL: '/scend',
  timeout: 5000,
  headers: {
    'Content-Type': 'application/json',
    'token':'gasvdgavdjgvajdgasvjdg'
  },
})
service.interceptors.request.use(
  config=>{
    return config
  },
  error=>{
    console.log(error)
    return Promise.reject(error)
  }
)
service.interceptors.response.use(
  response=>{
    const res = response.data
    console.log(res)
    return(res)
  },
  error=>{
    console.log('err',error)
    return Promise.reject(error)
  }
)
export default service
